package com.chunayev.numerology.gui.table;

import static com.chunayev.numerology.util.Constants.RESOURCE_BUNDLE;

import java.util.ArrayList;
import java.util.List;

import javax.swing.table.AbstractTableModel;

/**
 * @author Sergey Chunayev
 */
public class CalculationResultsTableModel extends AbstractTableModel {
    
    private static final String[] COLUMN_NAMES = {
            RESOURCE_BUNDLE.getString("calculation.column.data.header"),
            RESOURCE_BUNDLE.getString("calculation.column.value.header"),
            RESOURCE_BUNDLE.getString("calculation.column.position.header") };
    
    /**
     * 
     */
    private static final long serialVersionUID = 2653623399190687470L;
    
    private List<String> data;
    
    /**
     * 
     */
    public CalculationResultsTableModel() {
        setData(new ArrayList<String>());
    }
    
    /*
     * (non-Javadoc)
     * @see javax.swing.table.TableModel#getColumnCount()
     */
    @Override
    public int getColumnCount() {
        return COLUMN_NAMES.length;
    }
    
    /*
     * (non-Javadoc)
     * @see javax.swing.table.AbstractTableModel#getColumnName(int)
     */
    @Override
    public String getColumnName(final int column) {
        return COLUMN_NAMES[column];
    }
    
    /**
     * @return the data
     */
    public List<String> getData() {
        return this.data;
    }
    
    /*
     * (non-Javadoc)
     * @see javax.swing.table.TableModel#getRowCount()
     */
    @Override
    public int getRowCount() {
        return 0;
    }
    
    /*
     * (non-Javadoc)
     * @see javax.swing.table.TableModel#getValueAt(int, int)
     */
    @Override
    public Object getValueAt(final int rowIndex, final int columnIndex) {
        return null;
    }
    
    /**
     * @param data
     *            the data to set
     */
    public void setData(final List<String> data) {
        this.data = data;
    }
    
}
